import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
   {
      path: '/',
      name: 'home',
      redirect:'/weather' ,
   } ,
    {
      path: '/weather',
      name: 'weather',
      component: ()=>import('../views/WeatherView.vue'),
    },
    {
      path:`/weather/:code`,
      name:'weatherInfo',
      component:()=>import('../views/WeatherInfo.vue')
    }
 
  ]
})

export default router
